package com.longcai.controller.fuyoupay;


import com.longcai.bean.ApiResult;
import com.longcai.service.fuyoupay.ClyjFuyouCompanyRegisterService;
import com.longcai.service.fuyoupay.ClyjFuyouLinePayOrderService;
import com.longcai.service.fuyoupay.ClyjFuyouSubamountRuleService;
import com.longcai.vo.ClyjGoodsOrderDetailsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>
 * 富有支付分账规则录入表 前端控制器
 * </p>
 *
 * @author ZJ
 * @since 2019-03-31
 */
@Controller
@RequestMapping("/clyjFuyouSubamountRule")
public class ClyjFuyouSubamountRuleController {
	@Autowired
	private ClyjFuyouSubamountRuleService clyjFuyouSubamountRuleService;

	@Autowired
	private ClyjFuyouLinePayOrderService clyjFuyouLinPayOrderService;
	@Autowired
	private ClyjFuyouCompanyRegisterService clyjFuyouCompanyRegisterService;

	@RequestMapping("/subamountRuleImport")
	public ApiResult<?> saveSubamountRule(ClyjGoodsOrderDetailsVo clyjGoodsOrderDetailsVo){
		/**分账导入*/
		ClyjGoodsOrderDetailsVo clyjGoodsOrderDetailsVoR=clyjFuyouSubamountRuleService.ruleImport(clyjGoodsOrderDetailsVo);
		/**微信支付*/
		return this.clyjFuyouLinPayOrderService.weixinPay(clyjGoodsOrderDetailsVoR);
		
		/**分账*//*
		FuyouCommonPortMethod fcpm = new FuyouCommonPortMethod();
		BaseResponse subamount = fcpm.subamount(clyjGoodsOrderDetailsVo,cflp);
		if(subamount.getRespCode().equals("0000")){
			return ApiResult.success("分账成功");
		}
		if(c){
			return ApiResult.success("分账导入成功");
		}
		return ApiResult.fail("分账导入失败");
	}*/
	}
}
